//
//  LCFileManager.h
//  油递员(车队端)
//
//  Created by puman on 16/3/31.
//  Copyright © 2016年 mazegong. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CommonCrypto/CommonCrypto.h>
#import "RMMLoginTiShiView.h"

@interface RMMFileManager : NSObject

@property (strong, nonatomic) NSUserDefaults *userDefaults;
@property (strong, nonatomic) NSDictionary *userDic;
@property (strong, nonatomic) NSTimer *timer;
@property (strong, nonatomic) NSString *locationCity;
@property (strong, nonatomic) NSString *loginType;
@property (strong, nonatomic) NSString *openid;
@property (strong, nonatomic) NSString *totalTimeLength; // 服务总时长
@property (strong, nonatomic) NSString *region_id; // 地区id
@property (strong, nonatomic) NSMutableArray *fuWuTypeArray; // 服务类别
@property (strong, nonatomic) NSMutableDictionary *bookingDic;
@property (strong, nonatomic) NSString *payTypeName; // 是购还是充值
@property (strong, nonatomic) NSString *thred;       // 是否要到订单
@property (strong, nonatomic) NSString *fromSkillType;
@property (strong, nonatomic) NSString *totalPrcie;
@property (strong, nonatomic) NSMutableArray *skillBookingArray;
@property (assign, nonatomic) BOOL isAddBookingOrder;     // 是否是加单
/**
 上门还是到店
 */
@property (strong, nonatomic) NSString *fuWuType; // 是上门还是到店
@property (assign, nonatomic) BOOL isLoginSuccess;
@property (strong, nonatomic) NSString *shopCount;

+ (RMMFileManager *)shareHandle;
+ (NSString *)getMD5WithString:(NSString *)time;
+ (NSString *)getTimesTamp;
+ (BOOL)isNetwork;
// 判断是不是手机号
/**
 判断字符串是不是手机号

 @param phoneNumber 传入的字符串
 @return 是不是手机号
 */
+ (BOOL)isPhoneNumberWith:(NSString *)phoneNumber;
/**
 轻量级级的数据持久化

 @param value 要保存的对象
 @param key 保存对象的键
 */
- (void)saveVale:(id)value forKey:(NSString *)key;
/**
 取出保存的轻量级数据

 @param key 取值的键
 @return 取出的对象
 */
- (id)getValeForKey:(NSString *)key;
+ (void)removeObjForKey:(NSString *)key;
+ (void)MBProgressWith:(NSString *)msg onView:(UIView *)view;
+ (void)changeLabelTextColorWithLabel:(UILabel *)label secondeString:(NSString *)string forRange:(NSRange)range byColor:(UIColor *)color;
+ (void)changeLabelTextColorOneWithLabel:(UILabel *)label forRange:(NSRange)range byColor:(UIColor *)color;
// 只允许输入数字和小数
/**
 只允许输入数字和小数

 @param string 输入的字符窜
 @return <#return value description#>
 */
+ (BOOL)OnlyAllowEnterNumbersAndDecimalWith:(NSString *)string;
// 只允许输入汉字
+ (BOOL)onelyAllowEnterChinese:(NSString *)string;
// 只允许输入英文
+ (BOOL)onelyAllowEnterEnglish:(NSString *)string;
// 验证身份证号
/**
 省份证号检验

 @param string <#string description#>
 @return <#return value description#>
 */
+ (BOOL)validationIdCardWith:(NSString *)string;
// 获得当前时间<不同格式>
+ (NSString *)getNowTimeWithFormatterString:(NSString *)formatterString;
+ (void)callKeFuWithPhoneNumber:(NSString *)number onView:(UIView *)view;
+ (void)openUserInteractionEnabledWith:(UIButton *)button;
+ (void)offUserInteractionEnabled:(UIButton *)button;
+ (NSString *)formatStringFor:(NSDictionary *)dic;

/**
 数字键盘的inputView一般点击让数字键盘消失

 @return Button
 */
+ (UIButton *)addInputViewForTextField;
+ (id)retrunObjWith:(id)obj;
+ (void)butOnWithBut:(UIButton *)button;
+ (void)butOffWithBut:(UIButton *)button;
/**
 转换对象里面的数据避免出现null的数据

 @param dicrionary 源数据
 @return 处理好的数据
 */
+ (NSDictionary *)setValueForDic:(NSDictionary *)dicrionary;

@end
